package com.gange.springboot.dao;

import com.gange.springboot.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

//@Mapper  //为这个类自动生成实现类，Spring会创建一个该实现类的对象，对象名为：userMapper
public interface UserMapper {
    User selectByNameAndPwd(@Param("name") String name, @Param("password") String password);
    void insert(User user);
    int delete(int id);
    void update(User user);
    List<User> selectAll();
    User selectById(int id);
}
